(prompt ("Setting up Hostname for Unit #%ld\n\nWhat is the name of the host machine that you want to print to?\nCan also be the IP Address of a Network Ready Printer.\n\n"
(prompt ("Selecting a Job for Unit #%ld\n\nThis is used in the creation of a banner page\nfor your printout (up to 99 characters).\n\n No entry is required.\n\n"
(prompt ("Selecting a Query Name for Unit #%ld\n\nThis is used to help you identify your printouts\n(up to 131 characters).\n \nThis information will be returned when you\nquery (\"lpq\") the server for status\n\n No entry is required.\n\n"
Unit))
(help @askstring-help)
(default ("%s" QueryName))
)
)
; Time to place these values into ENV:
(if (NOT (exists ("ENV:NetPar/%ld" Unit)))
(run ("makedir ENV:NetPar/%ld" Unit)
(prompt "Making Unit Directory")
)
)
(if (exists ("ENV:NetPar/%ld" Unit))
(
(run ("setenv NetPar/%ld/PrinterHOST \"%s\"" Unit HostName)
(prompt "Storing Hostname")
)
(run ("setenv NetPar/%ld/PrinterNAME \"%s\"" Unit PrinterName)
(prompt "Storing Printer name")
)
(if (> (strlen JobName) 0)
(run ("setenv NetPar/%ld/JobNAME \"%s\"" Unit JobName)
(prompt "Storing selected Job")
)
((if (exists ("ENV:NetPar/%ld/JobNAME" Unit))
(delete ("ENV:NetPar/%ld/JobNAME" Unit)
(prompt "Removing Old Job")
(optional "force")
)
)
(if (exists ("ENVARC:NetPar/%ld/JobNAME" Unit))
(delete ("ENVARC:NetPar/%ld/JobNAME" Unit)
(prompt "Removing Old Job")
(optional "force")
)
)
)
)
(if (> (strlen QueryName) 0)
(run ("setenv NetPar/%ld/QueryNAME \"%s\"" Unit QueryName)